/*"Water", "Energ_Kcal", 
"Protein", "Lipid_Tot", "Ash", "Carbohydrt", 
"Fiber_TD", "Sugar_Tot", "Calcium", "Iron", 
"Magnesium", "Phosphorus", "Potassium", "Sodium", 
"Zinc", "Copper", "Manganese", "Selenium", "Vit_C", 
"Thiamin", "Riboflavin", "Niacin", "Panto_Acid", 
"Vit_B6", "Folate_Tot", "Folic_Acid", "Food_Folate", 
"Folate_DFE", "Choline_Tot", "Vit_B12", "Vit_A_IU", 
"Vit_A_RAE", "Retinol", "Alpha_Carot", "Beta_Carot", 
"Beta_Crypt", "Lycopene", "Lut_Zea", "Vit_E", "Vit_D_mcg", 
"ViVit_D_IU", "Vit_K", "FA_Sat", "FA_Mono", "FA_Poly", 
"Cholestrl",*/

package com.msi.manning.network;

import java.util.HashMap;

public class Rectify 
{
	HashMap<String, String> names;
	HashMap<String, String> units;
	
	public Rectify()
	{
		names = new HashMap<String, String>();
		units = new HashMap<String, String>();
		updateNames();
		updateUnits();
	}
	
	public void updateNames()
	{
		// names
		names.put("Water", "Water");
		names.put("Energ_Kcal", "Energy");
		names.put("Protein", "Protein");
		names.put("Lipid_Tot", "Total lipid (fat)");
		names.put("Ash", "Ash");
		names.put("Carbohydrt", "Carbohydrate, by difference");
		names.put("Fiber_TD", "Carbohydrate, by difference");
		names.put("Sugar_Tot", "Sugars, total");
		names.put("Calcium", "Calcium, Ca");
		names.put("Iron", "Iron, Fe");
		names.put("Magnesium", "Magnesium, Mg");
		names.put("Phosphorus", "Phosphorus, P");
		names.put("Potassium", "Potassium, K"); 
		names.put("Sodium", "Sodium, Na");
		names.put("Zinc", "Zinc, Zn");
		names.put("Copper", "Copper, Cu");
		names.put("Manganese", "Manganese, Mn");
		names.put("Selenium", "Selenium, Se");
		names.put("Vit_C", "Vitamin C, total ascorbic acid");
		names.put("Thiamin", "Thiamin");
		names.put("Riboflavin", "Riboflavin");
		names.put("Niacin", "Niacin");
		names.put("Panto_Acid", "Pantothenic acid");
		names.put("Vit_B6", "Vitamin B-6");
		names.put("Folate_Tot", "Folate, total");
		names.put("Food_Folate", "Folate, food");
		names.put("Folic_Acid", "Folic acid");
		names.put("Folate_DFE", "Folate, DFE");
		names.put("Vit_B12", "Vitamin B-12");
		names.put("Vit_A_IU", "Vitamin A, IU");
		names.put("Retinol", "Water");
		names.put("Choline_Tot", "Choline, total");
		names.put("Vit_A_RAE", "Vitamin A, RAE");
		names.put("Retinol", "Retinol");
		names.put("Alpha_Carot", "Carotene, alpha");
		names.put("Beta_Carot", "Carotene, beta");
		names.put("Beta_Crypt", "Cryptoxanthin, beta");
		names.put("Lycopene", "Lycopene");
		names.put("Lut_Zea", "Lutein + zeaxanthin");
		names.put("Vit_E", "Vitamin E (alpha-tocopherol)");
		names.put("Vit_D_mcg", "Vitamin D3 (cholecalciferol)");
		names.put("ViVit_D_IU", "Vitamin D");
		names.put("Vit_K", "Vitamin K (phylloquinone)");
		names.put("FA_Sat", "Fatty acids, total saturated");
		names.put("FA_Mono", "Fatty acids, total monounsaturated");
		names.put("FA_Poly", "Fatty acids, total polyunsaturated");
		names.put("Cholestrl", "Cholesterol");
		names.put("Tot_Fat", "Total fat");
	}
	
	public void updateUnits()
	{
		units.put("Water", "g");
		units.put("Energ_Kcal", "kcal");
		units.put("Protein", "g");
		units.put("Lipid_Tot", "g");
		units.put("Ash", "g");
		units.put("Carbohydrt", "g");
		units.put("Fiber_TD", "g");
		units.put("Sugar_Tot", "g");
		units.put("Calcium", "mg");
		units.put("Iron", "mg");
		units.put("Magnesium", "mg");
		units.put("Phosphorus", "mg");
		units.put("Potassium", "mg"); 
		units.put("Sodium", "mg");
		units.put("Zinc", "mg");
		units.put("Copper", "mg");
		units.put("Manganese", "mg");
		units.put("Selenium", "mcg");
		units.put("Vit_C", "mg");
		units.put("Thiamin", "mg");
		units.put("Riboflavin", "mg");
		units.put("Niacin", "mg");
		units.put("Panto_Acid", "mg");
		units.put("Vit_B6", "mg");
		units.put("Folate_Tot", "mcg");
		units.put("Food_Folate", "mcg");
		units.put("Folic_Acid", "mcg");
		units.put("Folate_DFE", "mcg_DFE");
		units.put("Vit_B12", "mcg");
		units.put("Vit_A_IU", "IU");
		units.put("Retinol", "mcg");
		units.put("Choline_Tot", "mg");
		units.put("Vit_A_RAE", "mcg_RAE");
		units.put("Retinol", "mcg");
		units.put("Alpha_Carot", "mcg");
		units.put("Beta_Carot", "mcg");
		units.put("Beta_Crypt", "mcg");
		units.put("Lycopene", "mcg");
		units.put("Lut_Zea", "mcg");
		units.put("Vit_E", "mg");
		units.put("Vit_D_mcg", "mcg");
		units.put("ViVit_D_IU", "IU");
		units.put("Vit_K", "mcg");
		units.put("FA_Sat", "g");
		units.put("FA_Mono", "g");
		units.put("FA_Poly", "g");
		units.put("Cholestrl", "mg");
		units.put("Tot_Fat", "g");
	}
	
	public String getName(String inName)
	{
		if (names.get(inName) != null)
			return names.get(inName);
		else 
			return inName;
	}
	
	public String getUnit(String inName)
	{
		if (units.get(inName) != null)
			return units.get(inName);
		else return inName;
	}
}
